//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package common;

import messages.AdvertisementList;
import messages.AvatarInfoListResponse;
import messages.Base;
import messages.BuyFromStandResponse;
import messages.ChangeFarmNameResponse;
import messages.EndClientTurnOK;
import messages.GetOffersReply;
import messages.GoHome;
import messages.InitSecureConnectionOk;
import messages.LoginFailed;
import messages.LoginOK;
import messages.NotifyPurchase;
import messages.NotifyVisitedOnSale;
import messages.NotifyVisitedPurshase;
import messages.OutOfSync;
import messages.OwnCityData;
import messages.OwnFishingData;
import messages.OwnHomeData;
import messages.StartSecureConnection;
import messages.StartSecureConnectionOK;
import messages.Unknown;
import messages.VisitedGregData;
import messages.VisitedHomeData;

import java.io.IOException;

public class HaydayMessageByType {
    public HaydayMessageByType() {
    }

    public static Base get(int msgType) throws IOException {
        switch(msgType) {
            case 10122:
                return new StartSecureConnection();
            case 14101:
                return new GoHome();
            case 20100:
                return new InitSecureConnectionOk();
            case 20101:
                return new NotifyVisitedPurshase();
            case 20103:
                return new LoginFailed();
            case 20104:
                return new LoginOK();
            case 20106:
                return new NotifyPurchase();
            case 20107:
                return new NotifyVisitedOnSale();
            case 20116:
                return new AvatarInfoListResponse();
            case 20122:
                return new StartSecureConnectionOK();
            case 24101:
                return new OwnHomeData();
            case 24102:
                return new VisitedHomeData();
            case 24103:
                return new BuyFromStandResponse();
            case 24104:
                return new ChangeFarmNameResponse();
            case 24110:
                return new AdvertisementList();
            case 24112:
                return new EndClientTurnOK();
            case 24115:
                return new VisitedGregData();
            case 24119:
                return new OutOfSync();
            case 24122:
                return new OwnFishingData();
            case 24123:
                return new OwnCityData();
            case 24124:
                return new GetOffersReply();
            default:
                return new Unknown(msgType);
        }
    }
}
